/**
 * DataCollectClient.java
 * com.sftj.datacollect.collect
 * Copyright (c) 2018, 北京科技有限公司版权所有.
*/

package com.sftz.modules.datacollect;

import com.sftz.modules.datacollect.analytics.service.StudyMessageService;
import com.sftz.modules.datacollect.analytics.service.StudyRecordAService;
import com.sftz.modules.datacollect.analytics.service.StudyRecordTimeService;
import com.sftz.modules.datacollect.analytics.service.StudyRecordVService;
import com.sftz.modules.datacollect.analytics.service.Impl.AudioStudyRecordServiceImpl;
import com.sftz.modules.datacollect.analytics.service.Impl.StudyRecordTimeServiceImpl;
import com.sftz.modules.datacollect.analytics.service.Impl.StudyTimeLogServiceImpl;
import com.sftz.modules.datacollect.analytics.service.Impl.VideoStudyRecordServiceImpl;

/**
 * 数据收集客户端
 * <p>
 * 1，对外提供数据收集服务；
 * 2，对外提供数据分析服务。
 * @author   朱晓川
 * @Date	 2018年4月21日 	 
 */
public class DataCollectClient {

	private static StudyMessageService studyMessageService;

	private static StudyRecordAService studyRecordAService;

	private static StudyRecordVService studyRecordVService;

	private static StudyRecordTimeService studyRecordTimeService;

	static {
		try {
			/*ioc = new NutIoc(new ComboIocLoader("*org.nutz.ioc.loader.json.JsonLoader", "data-collect/db.js",
					"data-collect/data_collect.js"));
			collectService = ioc.get(DefaultDataCollectService.class, "collectService");
			studyTimeService = ioc.get(StudyTimeLogService.class, "studyTimeService");
			videoStudyRecordService = ioc.get(VideoStudyRecordService.class, "videoStudyRecordService");
			audioStudyRecordService = ioc.get(AudioStudyRecordService.class, "audioStudyRecordService");*/

			studyMessageService = new StudyTimeLogServiceImpl();
			studyRecordAService = new AudioStudyRecordServiceImpl();
			studyRecordVService = new VideoStudyRecordServiceImpl();
			studyRecordTimeService = new StudyRecordTimeServiceImpl();
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	private DataCollectClient() {
	}

	public static StudyMessageService getStudyMessageService() {
		return studyMessageService;
	}

	public static StudyRecordAService getStudyRecordAService() {
		return studyRecordAService;
	}

	public static StudyRecordVService getStudyRecordVService() {
		return studyRecordVService;
	}

	public static StudyRecordTimeService getStudyRecordTimeService() {
		return studyRecordTimeService;
	}

}
